import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    redirect:'/home'
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/home/index.vue'),
    meta:{
      isFootShow:true
    }
  },
  {
    path: '/home/nav',
    name: 'nav',
    component: () => import('../views/home/nav/index.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/home/brand',
    name: 'brand',
    component: () => import('../views/home/brand/index.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/home/brand/detail',
    name: 'detail',
    component: () => import('../views/home/brand/detail.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/home/new',
    name: 'new',
    component: () => import('../views/home/new/index.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/home/new/good',
    name: 'good',
    component: () => import('../views/home/new/good.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/home/special',
    name: 'special',
    component: () => import('../views/home/special/index.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/home/city',
    name: 'city',
    component: () => import('../views/home/city/index.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/topic',
    name: 'topic',
    component: () => import('../views/topic/index.vue'),
    meta:{
      isFootShow:true
    }
  },
  {
    path: '/category',
    name: 'category',
    component: () => import('../views/category/index.vue'),
    meta:{
      isFootShow:true
    }
  },
  {
    path: '/category/detail',
    name: 'detail',
    component: () => import('../views/category/detail.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/cart',
    name: 'cart',
    component: () => import('../views/cart/index.vue'),
    meta:{
      isFootShow:true
    }
  },
  {
    path: '/cart/pay',
    name: 'pay',
    component: () => import('../views/cart/pay.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/cart/address',
    name: 'address',
    component: () => import('../views/cart/address.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/cart/addpoint',
    name: 'addpoint',
    component: () => import('../views/cart/addpoint.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/cart/edit',
    name: 'edit',
    component: () => import('../views/cart/edit.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/my',
    name: 'my',
    component: () => import('../views/my/index.vue'),
    meta:{
      isFootShow:true
    }
  },
  {
    path: '/my/collect',
    name: 'collect',
    component: () => import('../views/my/collect.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/search',
    name: 'search',
    component: () => import('../views/search/index.vue'),
    meta:{
      isFootShow:false
    }
  },
  {
    path: '/search/info',
    name: 'info',
    component: () => import('../views/search/info.vue'),
    meta:{
      isFootShow:false
    }
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
